home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / Alert.as < prev    next >
Encoding:
Text File  |  1998-01-12  |  858 b   |  18 lines  |  [TEXT/ToyS]

  1. Alert(1, "m1: ‘Alert(icn, m1, m2, b1, b2)’
  2. Place your main message text here.", ¬
  3.     "m2: More detailed text.  Icn: the icon ID." & ¬
  4.     "  0 -> Stop, 1 -> Note, 2 -> Warning." & ¬
  5.     "  b1: default button, b2: \"\" or cancel.", "OK", "") --, "Not OK")
  6.  
  7.  
  8. on Alert(icn, msg1, msg2, btn1, btn2)
  9.     set c to [{class:push button, bounds:[295, 83, 353, 103], name:btn1}]
  10.     if btn2 ≠ "" then set c to c & [{class:push button, bounds:[225, 83, 283, 103], name:btn2}]
  11.     set dlog to {size:[362, 112], style:movable dialog, contents:c & [¬
  12.         {class:icon, bounds:[17, 9, 17 + 32, 9 + 32], contents:icn}, ¬
  13.         {class:static text, bounds:[67, 9, 352, 9 + 32], contents:msg1}, ¬
  14.         {class:static text, bounds:[67, 45, 352, 45 + 26], contents:msg2, font:5} ¬
  15.             ]}
  16.     
  17.     (dd auto dialog dlog with fonts [null, null, null, null, {name:"Geneva", size:10}] with grayscale)'s item 1
  18. end Alert